# population sim. Basic 

pop <- function( R = 1, N0 = 1,  Replicate = 10) {
N <- rep(0, Replicate)
N[1] = N0
for(j in 2:Replicate)
{
N[j] = R*N[j-1]
}
N
}


lab1 <- function(b = 2.5, d = 1, IT = 100)
{
R = b-d #per capita geometric growth rate

X1 = 25 #setting initial population size

X = rep(NA, IT) #making empty abundance vector

X[1] = X1 #setting initial abundance in vector as N1

for(T in 2:IT){ #starting the loop: for all T's in

                #the vector between 2 and IT

 

  X[T] = X[T-1]*R  #do the following calculation

                  #and fill it into the

                  #appropriate spot in the
			
               	#vector

} #end the loop
X
}